import 'package:flutter/material.dart';
import 'package:ljy_flutter/provider_mvvm_example/view_model/joke_view_model.dart';

class JokeItem extends StatelessWidget {
  final JokeViewModel? jokeViewModel;

  const JokeItem({super.key, this.jokeViewModel});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 15, right: 15, top: 10, bottom: 10),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.end,
        children: [
          Text('${jokeViewModel?.joke.content}', style: TextStyle(fontSize: 16, color: Colors.black87, letterSpacing: 1.3, wordSpacing: 2),),
          SizedBox(height: 5,),
          Text('${jokeViewModel?.joke.updatetime}', style: TextStyle(fontSize: 12, color: Colors.grey),)
        ],
      ),
    );
  }
}